import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-09-19
 * Time: 19:44
 */
public class TestClass {

    public static void main(String[]args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int count = 0;
        int flag = 1;
        String[]ret = s.split(" ");
        count = ret.length;
        System.out.println(count);
    }
}
